package com.ruoyi.system.service.impl;

import java.util.List;

import com.ruoyi.common.annotation.DataScope;
import com.ruoyi.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.system.mapper.DtQuestionMapper;
import com.ruoyi.system.domain.DtQuestion;
import com.ruoyi.system.service.IDtQuestionService;

/**
 * 党统督办Service业务层处理
 * 
 * @author ruoyi
 * @date 2024-03-18
 */
@Service
public class DtQuestionServiceImpl implements IDtQuestionService 
{
    @Autowired
    private DtQuestionMapper dtQuestionMapper;

    /**
     * 查询党统督办
     * 
     * @param id 党统督办主键
     * @return 党统督办
     */
    @Override
    @DataScope(deptAlias = "d")
    public DtQuestion selectDtQuestionById(String id)
    {
        return dtQuestionMapper.selectDtQuestionById(id);
    }

    /**
     * 查询党统督办列表
     * 
     * @param dtQuestion 党统督办
     * @return 党统督办
     */
    @Override
    @DataScope(deptAlias = "d")
    public List<DtQuestion> selectDtQuestionList(DtQuestion dtQuestion)
    {
        return dtQuestionMapper.selectDtQuestionList(dtQuestion);
    }
    
    @Override
    @DataScope(deptAlias = "d")
    public List<DtQuestion> selectDtQuestionListForPublish(DtQuestion dtQuestion)
    {
        return dtQuestionMapper.selectDtQuestionListForPublish(dtQuestion);
    }
    
    @Override
    @DataScope(deptAlias = "d")
    public List<DtQuestion> selectDtQuestionListForReform(DtQuestion dtQuestion)
    {
        return dtQuestionMapper.selectDtQuestionListForReform(dtQuestion);
    }
    
    @Override
    @DataScope(deptAlias = "d")
    public List<DtQuestion> selectDtQuestionListForCheck(DtQuestion dtQuestion)
    {
        return dtQuestionMapper.selectDtQuestionListForCheck(dtQuestion);
    }

    /**
     * 新增党统督办
     * 
     * @param dtQuestion 党统督办
     * @return 结果
     */
    @Override
    public int insertDtQuestion(DtQuestion dtQuestion)
    {
        dtQuestion.setCreateTime(DateUtils.getNowDate());
        return dtQuestionMapper.insertDtQuestion(dtQuestion);
    }

    /**
     * 修改党统督办
     * 
     * @param dtQuestion 党统督办
     * @return 结果
     */
    @Override
    public int updateDtQuestion(DtQuestion dtQuestion)
    {
        return dtQuestionMapper.updateDtQuestion(dtQuestion);
    }

    /**
     * 批量删除党统督办
     * 
     * @param ids 需要删除的党统督办主键
     * @return 结果
     */
    @Override
    public int deleteDtQuestionByIds(String[] ids)
    {
        return dtQuestionMapper.deleteDtQuestionByIds(ids);
    }

    /**
     * 删除党统督办信息
     * 
     * @param id 党统督办主键
     * @return 结果
     */
    @Override
    public int deleteDtQuestionById(String id)
    {
        return dtQuestionMapper.deleteDtQuestionById(id);
    }
}
